﻿using Camc.Quality.RecordTable.FormBase;
using Camc.Quality.RecordTable.FormClass;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Camc.Quality.RecordTable.FormEntity
{
    public class 低频压接实验测量记录表 : TableBase
    {

        public 低频压接实验测量记录表(int serialNum, Guid workStepEntityId, Guid processesEntityId, int sort, string toolUsed, string secondToolUsed, string thirdToolUsed, string recordItem)
        {
            SerialNum = serialNum;
            WorkStepEntityId = workStepEntityId;
            ProcessesEntityId = processesEntityId;
            Sort = sort;
            ToolUsed = toolUsed;
            SecondToolUsed = secondToolUsed;
            ThirdToolUsed = thirdToolUsed;
            RecordItem = recordItem;
        }

        public override string FormName { get; protected set; } = "低频压接实验测量记录表";

        #region  A12_压接钳编号
        public override string ToolUsed_DisplayName { get; protected set; } = "压接钳编号";
        public override bool ToolUsed_Enable { get; protected set; } = true;
        public override bool ToolUsed_Show { get; protected set; } = true;
        public override int ToolUsed_Property { get; protected set; } = 2;
        #endregion
        #region A15_微欧计编号
        public override string SecondToolUsed_DisplayName { get; protected set; } = "微欧计编号";
        public override bool SecondToolUsed_Enable { get; protected set; } = true;   
        public override bool SecondToolUsed_Show { get; protected set; } = true;
        public override int SecondToolUsed_Property { get; protected set; } = 2;
        #endregion
        #region A16_高阻表编号
        public override string ThirdToolUsed_DisplayName { get; protected set; } = "高阻表编号";
        public override bool ThirdToolUsed_Enable { get; protected set; } = true;
        public override bool ThirdToolUsed_Show { get; protected set; } = true;
        public override int ThirdToolUsed_Property { get; protected set; } = 2;
        #endregion
        #region A11_测力计编号
        public override string RecordItem_DisplayName { get; protected set; } = "测力计编号";
        public override bool RecordItem_Enable { get; protected set; } = true;
        public override bool RecordItem_Show { get; protected set; } = true;
        public override int RecordItem_Property { get; protected set; } = 2;
        #endregion
        /// <summary>
        /// 记录要求
        /// </summary>
        /// <param name="entity"></param>
        /// <param name="recordLocation"></param>
        /// <param name="recordRequire"></param>
        /// <param name="recordStatus"></param>
        /// <param name="recordMainopoint"></param>
        /// <returns></returns>
        public RecordRequirementsEntity SetRecordRequirements(RecordRequirementsEntity entity, string recordLocation, string recordRequire, string recordStatus, string recordMainopoint)
        {
            entity.SetRecordLocation(recordLocation, "中间接头型", true, true, 2);
            entity.SetRecordRequire(recordRequire, "拉脱力检查", false, true, 1);
            entity.SetRecordStatus(recordStatus, "压接电阻检查", false, true, 1);
            entity.SetRecordMainopoint(recordMainopoint, "抗电强度检查", false, true, 1);
            return entity;
        }
        /// <summary>
        /// 实测值
        /// </summary>
        /// <param name="entity"></param>
        /// <param name="firstMeasuredValues"></param>
        /// <param name="secondMeasuredValues"></param>
        /// <param name="thirdMeasuredValues"></param>
        /// <returns></returns>

        public MeasuredResultEntity SetMeasuredResult(MeasuredResultEntity entity, string firstMeasuredValues, string secondMeasuredValues, string thirdMeasuredValues)
        {
            entity.SetFirstMeasuredValues(firstMeasuredValues, "实测值1", true, true, 0);
            entity.SetSecondMeasuredValues(secondMeasuredValues, "实测值2", true, true, 0);
            entity.SetThirdMeasuredValues(thirdMeasuredValues, "实测值3", true, true, 0);
            return entity;
        }
        /// <summary>
        /// 三检
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public InspectionSignatureEntity SetInspectionSignature(InspectionSignatureEntity entity)
        {
            entity.InspectionSignatureName = "三检";
            entity.SetFirstOperator(null, "操作者", true, true, 0, null, "操作者操作时间", true, true, 0);
            entity.SetSecondOperator(null, "互检者", true, true, 0, null, "互检者操作时间", true, true, 0);
            entity.SetThirdOperator(null, "检验员", true, true, 0, null, "检验员操作时间", true, true, 0);
            return entity;
        }
    }
}
